<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import ="openAPI.Shop" import="openAPI.Search" import="java.util.*" %>

<%
	request.setCharacterEncoding("UTF-8");
	String query = request.getParameter("query");
	System.out.println(query);
	Shop shop = new Shop();
	shop.sendRequest(query);
	
	ArrayList<Search> list = new ArrayList<Search>();
	list = shop.searchList;
	
	%>
	<table border="1">
	<tr>
	<%
	String str = null;
	for(int i=0;i<list.size();i++){
		Search search= list.get(i);%>
		<td>title : <%=search.title%></td>
		<td><a href ="<%=search.link%>"><img src="<%=search.image%>"></a></td>
		<td>최고가 : <%=search.lprice%></td>
		<td>최저가 : <%=search.hprice%></td>
			</tr>
			<%} %>
			
	</table>
	<%list.clear();%>
